package com.kczd.jinlan.activity;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.ListView;

import com.kczd.jinlan.R;
import com.kczd.jinlan.adapter.TimeLineAdapter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * yang_g
 * 物流
 * Created by Administrator on 2017/5/29.
 */

public class LogisticsActivity extends Activity {
    private ListView listView;
    private TimeLineAdapter adapter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.logistics_activity);
        listView = (ListView) findViewById(R.id.lv_list);
        listView.setDividerHeight(0);
        adapter = new TimeLineAdapter(this, initData());
        listView.setAdapter(adapter);
    }

    private List<Map<String, Object>> initData() {
        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();

        Map<String, Object> map = new HashMap<String, Object>();
        map.put("title", "【新疆乌鲁木齐】派件员白先生正在为您派件...");
        map.put("phone","联系电话：123456789");
        map.put("time", "2017-04-28  10:21:59");
        list.add(map);

        map = new HashMap<String, Object>();
        map.put("title", "【新疆乌鲁木齐】您的物品已到达天山区，请耐心等待...");
        map.put("phone","联系电话：123456789");
        map.put("time", "2017-04-28  10:21:59");
        list.add(map);

        map = new HashMap<String, Object>();
        map.put("title", "【新疆乌鲁木齐】已签收，签收人本人，感谢您的惠顾...");
        map.put("time", "2017-04-28  10:21:59");
        list.add(map);


        return list;

    }
}
